package com.tiny.work.test.stackoverflow;

import java.util.Scanner;

public class Startup {

    public static void start() {

        // Build rooms
        final int WIDTH = 2;
        final int HEIGHT = 2;
        Room[][] room = new Room[WIDTH][HEIGHT];
        Rooms.build(room, WIDTH, HEIGHT);
        int x = 0;
        int y = 0;

        // Print starting room description
        Rooms.print(room, x, y);

        // Start game loop
        boolean playing = true;
        while (playing) {

            // Get user input
            String input = Input.getInput();
//            System.out.println(input);

            // Movement commands
            if (input.equals("n")) {
                if (y > 0) {
                    y--;
                    Rooms.print(room, x, y);
                } else {
                    System.out.println("You can't go that way.");
                }
            }
        }
    }

    public static void main(String[] args) {
        Startup.start();

//        Scanner keyboard = new Scanner(System.in);
//
//        String[] sut;
//        String line;
//        int loop;
//
//        //Arrays - 92 teams in FL. Each team plays each other Home and Away = 182 fixtures
//
//        String[] HomeTeam = new String[92];
//        String[] AwayTeam = new String[92];
//        int[] HomeScore = new int[182];
//        int[] AwayScore = new int[182];
//
//        for (loop = 0; loop < 182; loop = loop + 1) {
//            //Input
//            System.out.println("Enter Result : ");
//            line = keyboard.nextLine();
//            if (line.equals("Stop") == true) {
//                break;
//            }
//
//            //Split Input
//            sut = line.split(":");
//
//            //Store the 4 Arrays
//            HomeTeam[loop] = sut[0].trim();
//            AwayTeam[loop] = sut[1].trim();
//            HomeScore[loop] = Integer.parseInt(sut[2].trim());
//            AwayScore[loop] = Integer.parseInt(sut[3].trim());
//
//        }//End Main Loop
//
//        System.out.println("User entered " + loop + "results"); //Error1
//
//        for (int loop2 = 0; loop2 < loop; loop2 = loop2 + 1) { //Error2
//            System.out.println(HomeTeam[loop2] + "  " + HomeScore[loop2] + " v " + AwayScore[loop2] + "  " + AwayTeam[loop2]); //Multiple errors in this line, all regarding the String names i set up earlier
//        }

    }
}
    class Rooms {

        public static void print(Room[][] room, int x, int y) {
        }

        public static void build(Room[][] room, int width, int height) {
        }
    }

    class Room {

    }

    class Input {

        public static String getInput() {

            System.out.print("> ");
            try (Scanner in = new Scanner(System.in)) {
                String input = in.nextLine();
                input.toLowerCase();
                return input;
            }
        }
    }
